package com.weipai.education.service;

import com.weipai.education.model.InventoryIn;
import com.weipai.education.model.Purchase;
import com.weipai.education.model.User;
import com.weipai.education.model.api.Response;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;

/**
 * @Author: 曹朋飞
 * @Date: 2018/12/13 09:59
 */
public interface PurchaseService {
    
    //进货单的保存
    Response save(Purchase purchase);

    //分页查询
    Response list(Integer page, Integer size, String startTime, String endTime, String key, 
                  String type, String userId, String status);

    //更改进货单的状态
    Response changeStatus(String id, String goodsBarCodes, String productId, String dhl, String expressNumber,Integer isHeadset,Integer productNumber);

    //通过进货单号查询此进货单的商品条形码
    Response getGoodsBarCodeByPurchaseNumber(String purchaseNumber);

    //入库
    Response inventoryInSave(InventoryIn inventoryIn, String goodsBarCodes);

    //进货单详情
    Response getPurchaseInfo(String purchaseNumber);

    Response headquartersInventoryInSave(String productId, String goodsBarCodes,
                                         String isPrice, String isDamage,Integer productNumber,String name,String spuNumber,Integer isHeadset);

    Response cityLevelList(Integer page, Integer size, String startTime, String endTime, String key);

    Response inventoryInSavebyNobarcode(InventoryIn inventoryIn, Integer productNumber,String productName,String inOrderNumber,String isheadset);

    Response searchOrderByOrderNumber(String OrderNumber,String type,Integer userId);

    Response saveOrder(@NotBlank(message = "产品id不能为空") String productId, Integer priductId, Purchase purchase);

    void addMessage(User user, BigDecimal price,Integer userId);
}
